package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sc.nft.enums.WhiteListEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
@Data
public class WhiteListVO {
    @ApiModelProperty(value = "唯一id")
    private Long id;

    @ApiModelProperty(value = "用户手机号")
    private String userTel;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "白名单筛选类型")
    @JsonIgnore
    private WhiteListEnum whiteListEnum;

    @ApiModelProperty(value = "白名单筛选描述")
    private String identityDescription;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    public void setWhiteListEnum(WhiteListEnum whiteListEnum) {
        this.whiteListEnum = whiteListEnum;
        this.identityDescription = whiteListEnum.getDescription();
    }
}
